#ifndef MAP_H
#define MAP_H

#include <QString>
#include <QPixmap>
#include "geocoordinates.h"
#include "constants.h"

// Класс для хранения карт.

class Map
{
private:
    unsigned long id;
    QString name, filePath;
    GeoCoordinates topLeft, topRight, bottomRight, bottomLeft;
    double CheckLine(const GeoCoordinates&, const GeoCoordinates&, const GeoCoordinates&);
    QPixmap pix;
public:
    double xXkoef[8], Xxkoef[8];
    Map(void);
    Map(const QString&, const unsigned long& = 0);
    ~Map();
    void ClearMap(void);
    bool SetName(const QString&);
    QString GetName(void) const;
    void SetID(const unsigned long&);
    unsigned long GetID(void) const;
    bool SetFilePath(const QString&);
    QString GetFilePath(void) const;
    void SetCalibration(const GeoCoordinates, const GeoCoordinates, const GeoCoordinates, const GeoCoordinates);
    void GetCalibration(GeoCoordinates&, GeoCoordinates&, GeoCoordinates&, GeoCoordinates &) const;
    bool CheckBorder(const GeoCoordinates&);
};

#endif // MAP_H
